// pages/collect/collect.js
Page({

    /**
     * 页面的初始数据
     */
    data: {
        lists: [

            "收藏的店铺",
            "收藏的商品",
            "收藏的look",
            "足迹",
        ],
        topLists: [
            "全部",
            "降价中",
            "低库存",
            "已售罄",
            "超级周末(2)",

        ],
        eleindex: 0,
        topIndex: 0,
        arrlist: [

        ],
        firstlist: [],
        secondlist:[],
        thirdlist: [],
        forthlist: [],

    },
    changeIndex(options) {
        let id = options.target.dataset.index;
        console.log(123);
        this.setData({
            eleindex: id,
        })
    },
    changeTopIndex(options) {
        let id = options.target.dataset.id;
        console.log(123);
        this.setData({
            topIndex: id,
        })
    },
    click(options) {

        console.log(options);
        let index = options.currentTarget.dataset.index;
        this.data.arrlist.splice(index, 1)[0];
        //  this.setData({this.data.goodsArr:this.data.goodsArr})

        this.setData({
            arrlist: this.data.arrlist,
        })


    },
    /**
     * 生命周期函数--监听页面加载
     */
    onLoad: function (options) {

    },

    /**
     * 生命周期函数--监听页面初次渲染完成
     */
    onReady: function () {

    },

    /**
     * 生命周期函数--监听页面显示
     */
    onShow: function () {
        // let arr = wx.getStorageSync("goodsCartContentAll");
        // this.setData({
        //     arrlist: arr,
        //     firstlist:arr.slice(0, 3),
        //     secondlist:arr.slice(1, 4),
        //     thirdlist:arr.slice(2, 5),
        //     forthlist:arr.slice(3, 6),


        // })
        // console.log(this.data.arrlist);

    },


    onHide: function () {

        // wx.setStorageSync('goodsCartContentAll', this.data.arrlist);
        // console.log(this.data.arrlist);
    },


    /**
     * 生命周期函数--监听页面卸载
     */
    onUnload: function () {

    },

    /**
     * 页面相关事件处理函数--监听用户下拉动作
     */
    onPullDownRefresh: function () {

    },

    /**
     * 页面上拉触底事件的处理函数
     */
    onReachBottom: function () {

    },

    /**
     * 用户点击右上角分享
     */
    onShareAppMessage: function () {

    }
})